package com.tian.mapper;

import com.tian.dto.exchange.ExchangeCodePageQueryReqDto;
import com.tian.dto.exchange.ExchangeCodeResDto;
import com.tian.entity.ExchangeCode;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ExchangeCodeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ExchangeCode record);

    int insertBatch(List<ExchangeCode> recordsToInsert);

    ExchangeCode selectByPrimaryKey(Long id);
    ExchangeCode selectByCode(String code);
    ExchangeCode selectByCouponId(Integer couponId);

    int countByCouponId(Integer couponId);

    List<ExchangeCode> selectAll();

    int updateByPrimaryKey(ExchangeCode record);

    List<ExchangeCodeResDto> seleteByCondition(ExchangeCodePageQueryReqDto exchangeCodePageQueryReqDto);

    ExchangeCode selectByOrderId(Long orderId);
}